package day9zy.Maolaoshu;

public class Laoshu {
   private String name;
   private int tl;

    public void setName(String name) {
        this.name = name;
    }

    public void setTl(int tl) {
            this.tl = tl;
    }

    public String getName() {
        return name;
    }

    public int getTl() {
        return tl-tl;
    }
    public Laoshu(String naem,int tl){
        this.name = naem;
        this.tl = tl;
    }
    public void m(){
        System.out.println("名字："+name+"体力："+tl);
    }
    public void beiyao(){
        System.out.println(getName()+"被咬死了体力变为："+getTl());
    }
}
